package com.wksc.framework.impexp.pattern;

import com.wksc.framework.impexp.bean.BaseFormatParams;
import com.wksc.framework.impexp.util.ClassFactory;

/**
 * <p> Title(文件名): ShowContentPattern.java </p>
 * <p> Description(描述): TODO </p>
 * <p> Copyright(版权): Copyright (c) 2011 </p>
 * <p> Company(公司): 成都四方信息技术有限公司 </p>
 * <p> CreateTime(生成日期)：2011-11-29下午04:18:08 </p>
 * @author wanglei
 * @version impExp_C13_P
 */
public class ShowContentPattern implements FormatPattern {
	private static final long serialVersionUID = 2418237325842324231L;
	
	private static ShowContentPattern INSTANCE = new ShowContentPattern();
	
	public static ShowContentPattern getINSTANCE(){
		return INSTANCE;
	}

	static final String BAN_MESSAGE = ClassFactory.getI18n().getUnauthorizedContentInfo();
	@Override
	public String format(BaseFormatParams params) {
		if(params.isShowContentRights()){
			return params.getCellContent().toString();
		}
		return BAN_MESSAGE;
	}

}
